<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>camray: src/camera_array_calibration.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">camray
   </div>
   <div id="projectbrief">Depth mapping algorithms using a camera array</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('camera__array__calibration_8cpp.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">camera_array_calibration.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Determines the camera matrix and focal length for each camera.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;camera_array_calibration.h&quot;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aface41c051a5907f3a4a6a75e66b9f00"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="camera__array__calibration_8cpp.html#aface41c051a5907f3a4a6a75e66b9f00">calibrate</a> (FileNode fs)</td></tr>
<tr class="separator:aface41c051a5907f3a4a6a75e66b9f00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec46f7c1bb70465874d2b41bae467274"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="camera__array__calibration_8cpp.html#aec46f7c1bb70465874d2b41bae467274">find_corners</a> (string img_base, string img_suf, Size board_size, vector&lt; vector&lt; Point2f &gt; &gt; &amp;all_corners, vector&lt; Mat &gt; &amp;image_set)</td></tr>
<tr class="separator:aec46f7c1bb70465874d2b41bae467274"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Determines the camera matrix and focal length for each camera. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aface41c051a5907f3a4a6a75e66b9f00"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int calibrate </td>
          <td>(</td>
          <td class="paramtype">FileNode&#160;</td>
          <td class="paramname"><em>fs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section author"><dt>Author</dt><dd>Brian Fehrman</dd></dl>
<dl class="section user"><dt>Description:</dt><dd>Calibrate cameras based on a given set of images. Can calibrate any number of image sets. Stores the results in the calib_dir folder specified by the user in the settings file.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fs</td><td>- FileNode pointing to the settings that are needed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 - everything went fine </dd></dl>

</div>
</div>
<a class="anchor" id="aec46f7c1bb70465874d2b41bae467274"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int find_corners </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>img_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>img_suf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Size&#160;</td>
          <td class="paramname"><em>board_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; vector&lt; Point2f &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>all_corners</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; Mat &gt; &amp;&#160;</td>
          <td class="paramname"><em>image_set</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section author"><dt>Author</dt><dd>Brian Fehrman</dd></dl>
<dl class="section user"><dt>Reference: http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html</dt><dd></dd></dl>
<dl class="section user"><dt>Description:</dt><dd>Find the inner corners in one or more images containg a chessboard and return those corners. It expects the pictures to be named img_base/#img_suf where # is the number of the picture in the set. The number should start at 0 and increment by 1 for each image. For instance: <pre class="fragment">img_base/0img_suf
img_base/1img_suf
img_base/2img_suf
...
img_base/nimg_suf
</pre> This will find the corners in each image in the set and return the points so that tey can be used for calibration. It continues until a file read error is encountered at which case it assumes that there are no more images in the directory and this is why it is important that the images are named using the convention outlined above.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">img_base</td><td>- Name of the base folder </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">img_suf</td><td>- Common suffix of all images </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">board_size</td><td>- Number of inner corners in (col, row) format </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">all_corners</td><td>- Stores the corners found for each image in the set </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">image_set</td><td>- Stores each of the images read in to be used in calibration</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 - everything went fine </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="camera__array__calibration_8cpp.html">camera_array_calibration.cpp</a></li>
    <li class="footer">Generated on Tue Apr 23 2013 23:15:47 for camray by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
